package org.lds.scheduled.job.client.endpoint;

import lombok.RequiredArgsConstructor;
import org.lds.scheduled.job.client.service.ScheduledJobService;
import org.lds.scheduled.job.common.model.dto.ResultDTO;
import org.lds.scheduled.job.common.model.request.ScheduledJobRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RequiredArgsConstructor
@RestController
@RequestMapping("/api/scheduled-job")
public class ScheduledJobEndpoint {
    private final ScheduledJobService scheduledJobService;

    @PostMapping("/common")
    public ResultDTO common(@RequestBody ScheduledJobRequest request) {
        return scheduledJobService.common(request);
    }

}
